package com.hxwm.hwdbtool.entity.core;

import lombok.Data;

import java.text.SimpleDateFormat;
import java.util.Date;

@Data
public class HwLogInfo{
    Integer index;
    String type;
    String date;
    String message;

    public HwLogInfo(Integer index,String type, long date, String message) {
        SimpleDateFormat sdf = new SimpleDateFormat("yyyy-MM-dd HH:mm:ss"); // 定义日期格式
        String formattedDate = sdf.format(new Date(date)); // 将 Date 对象格式化为字符串日期
        this.index = index;
        this.type = type;
        this.date = formattedDate;
        this.message = message;
    }
}